import request from '@/utils/request'

// 查询学生列列表
export function listTaskstudents(query) {
  return request({
    url: '/edu/taskstudents/list',
    method: 'get',
    params: query
  })
}

// 查询学生列详细
export function getTaskstudents(id) {
  return request({
    url: '/edu/taskstudents/' + id,
    method: 'get'
  })
}

// 新增学生列
export function addTaskstudents(data) {
  return request({
    url: '/edu/taskstudents',
    method: 'post',
    data: data
  })
}

// 修改学生列
export function updateTaskstudents(data) {
  return request({
    url: '/edu/taskstudents',
    method: 'put',
    data: data
  })
}

// 删除学生列
export function delTaskstudents(id) {
  return request({
    url: '/edu/taskstudents/' + id,
    method: 'delete'
  })
}

export function getBatchNums(taskId) {
  return request({
    url: '/edu/taskstudents/batchlist/' + taskId,
    method: 'get'
  })
}

export function getClassIds(taskId) {
  return request({
    url: '/edu/taskstudents/classlist/' + taskId,
    method: 'get'
  })
}

export function editBatchNum(data) {
  return request({
    url: '/edu/taskstudents/editBatchNum',
    method: 'put',
    data: data
  })
}